ioemu/qemu vga: save and restore vram buffer
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 12 Dec 2007 09:53:00 +0000 (09:53 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 12 Dec 2007 09:53:00 +0000 (09:53 +0000)
commit1082d7ca4216fe413de43b262aa6bb1c90efb90a
treea153473161c883cbd6e76588094c1d1b901c3a3f
parentd44424e2adc0d7c3a9a534a906af27363f78d579
ioemu/qemu vga: save and restore vram buffer

The existing stdvga driver from xen-unstable tools/ioemu/hw/vga* does
not save the emulated VGA memory contents.  The symptoms include video
malfunction after restore, including black screen (which can often be
fixed by asking the guest to redraw) but also missing font setup etc.
The attached patch fixes this by saving the entire VGA memory buffer,
just like the Xen ioemu Cirrus emulator does.

I have reinterpreted the `is_vbe' byte, which is related to
CONFIG_BOCHS_VBE, as a general flags word.  This enables my code to
allow old images to be restored (albeit with loss of VGA memory), by
using another bit in that word to indicate whether the VGA memory dump
is present.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/ioemu/hw/vga.c
tools/ioemu/hw/vga_int.h